<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    #box {
      position: fixed;
      right: 0;
      bottom: 200px;
      width: 200px;
      height: 50px;
      padding: 10px;
      background-color: rgba(0, 0, 0, 0.3);
    }
    .content {
      position: absolute;
      left: 220px;
      width: 160px;
      height: 50px;
      background-color: pink;
    }
    .arrow {
      float: right;
    }
  </style>
</head>
<body>
  <div id="box">
    <div class="content">很好</div>
    <div class="arrow">➡️</div>
  </div>

  <script src="./animate.js"></script>
  <script>
    var content = document.querySelector('.content')
    var arrow = document.querySelector('.arrow')
    var box = document.querySelector('#box')
    box.onmouseenter = function() {
      animate(content, 0, function() {
        arrow.innerHTML = '⬅️'
      })
    }
    box.onmouseleave = function() {
      animate(content, 220, function() {
        arrow.innerHTML = '➡️'
      })
    }
  </script>
</body>
</html>